<?php

header('Content-type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename=fordelivery_picklist.xls');

?>
<table border=1 style="font-family: Calibri; font-size: 14px; margin: 10px;">
<!-- Headers -->
<thead>
	<tr style="background: black; color: white;">
      <th>Sales Order Id</a></th>
      <th>Item Id</th>
      <th>Vendor</th>
      <th>Name</th>
      <th>Model</th>
      <th>Option</th>
    </tr>
 </thead> 

	@foreach($picklist as $key=>$value)
	<tr>
		<td>{{ $value->ORDER_id }}</td>
		 <td>{{ $value->id }}</td>
		<td>Vendor
		</td>
		 <td>{{ $value->name }}</td>
		 <td>{{ $value->model }}</td>
		 <td>@foreach($value->orderProductOptions as $option)
		 	{{ $option->option_value }}
		 @endforeach</td>

	</tr>
	@endforeach

</table>